home *** CD-ROM | disk | FTP | other *** search
- unit Openmsg;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls, ExtCtrls, MXMAILX;
-
- {$I mailxdef.int}
-
- type
- TMsgForm = class(TForm)
- Panel1: TPanel;
- btnHide: TButton;
- btnReply: TButton;
- btnForward: TButton;
- Label1: TLabel;
- szSubject: TEdit;
- Label2: TLabel;
- szNoteText: TMemo;
- Label3: TLabel;
- szAttachList: TComboBox;
- Label4: TLabel;
- szOriginator: TEdit;
- Label5: TLabel;
- szMessageID: TEdit;
- Label6: TLabel;
- szTime: TEdit;
- btnSend: TButton;
- MXForm1: TMXForm;
- MXMessage1: TMXMessage;
- MXRecipient1: TMXRecipient;
- MXFile1: TMXFile;
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure btnHideClick(Sender: TObject);
- procedure btnSendClick(Sender: TObject);
- procedure btnReplyClick(Sender: TObject);
- procedure btnForwardClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- MsgForm: TMsgForm;
-
- implementation
-
- {$R *.DFM}
-
- procedure TMsgForm.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- Action := caFree;
-
- end;
-
- procedure TMsgForm.btnHideClick(Sender: TObject);
- begin
- Close;
- end;
-
- procedure TMsgForm.btnSendClick(Sender: TObject);
- begin
- MXMessage1.Subject:= szSubject.Text;
- MXMessage1.NoteText:= szNoteText.Lines;
- MXMessage1.Action:= ACTION_SENDMSG;
- If MXMessage1.ErrorNum <> 0 Then
- begin
- Application.MessageBox('Error Sending Message',
- 'Mail X Demo for DELPHI',
- MB_OK);
- end;
- end;
-
- procedure TMsgForm.btnReplyClick(Sender: TObject);
- begin
- MXMessage1.Action:= ACTION_REPLY;
- MXMessage1.Action:= ACTION_SENDMSG;
- end;
-
- procedure TMsgForm.btnForwardClick(Sender: TObject);
- begin
- MXMessage1.NoteText:= szNoteText.Lines;
- MXMessage1.Action:= ACTION_FORWARD;
- MXMessage1.Action:= ACTION_SENDMSG;
- end;
-
- end.
-